<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ChompBombs: Référence du fichier /home/etu/c/p1006411/chompbombs/src/ennemi.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Généré par Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Recherche');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">ChompBombs</div>
   <div id="projectbrief">Jeu_de_Bomberman</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Recherche" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Membres&#160;de&#160;fichier</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Fonctions</a>  </div>
  <div class="headertitle">
<h1>Référence du fichier /home/etu/c/p1006411/chompbombs/src/ennemi.c</h1>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;time.h&gt;</code><br/>
<code>#include &lt;assert.h&gt;</code><br/>
<code>#include &lt;malloc.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="ennemi_8h_source.html">ennemi.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Fonctions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structennemi.html">ennemi</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#ac29c2fc9d161742535e6157a1617c1e4">ennemiInit</a> (<a class="el" href="structterrain.html">terrain</a> *ter, const int cooX, const int cooY)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">initialise un ennemi  <a href="#ac29c2fc9d161742535e6157a1617c1e4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#ada0d266ca8ce1d0dea970b2330efc97e">ennemiDetruire</a> (<a class="el" href="structennemi.html">ennemi</a> *vilain, <a class="el" href="structterrain.html">terrain</a> *ter)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">libère la mémoire alloué pour l'ennemi  <a href="#ada0d266ca8ce1d0dea970b2330efc97e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#afd1777fa7a252e49cece658fda059cfb">ennemiSetNumero</a> (<a class="el" href="structennemi.html">ennemi</a> *vilain, const int i)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">modifie le numero de l'ennemi  <a href="#afd1777fa7a252e49cece658fda059cfb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a980d7d43a6b3d545afbcef2bfa3b2de1">ennemiSetX</a> (<a class="el" href="structennemi.html">ennemi</a> *vilain, const int abs)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">modifie coordonné x de l'ennemi  <a href="#a980d7d43a6b3d545afbcef2bfa3b2de1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a595f2cbe1fd4585d705eeabd06facba1">ennemiSetY</a> (<a class="el" href="structennemi.html">ennemi</a> *vilain, const int ord)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">modifie coordonné y de l'ennemi  <a href="#a595f2cbe1fd4585d705eeabd06facba1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a1457a0d2ed952cda1ad09507cba618ac">ennemiGetX</a> (const <a class="el" href="structennemi.html">ennemi</a> *vilain)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">recupere coordonné x de l'ennemi  <a href="#a1457a0d2ed952cda1ad09507cba618ac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a34d64773304b7e7471a363b64b3d738b">ennemiGetY</a> (const <a class="el" href="structennemi.html">ennemi</a> *vilain)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">recupere coordonné y de l'ennemi  <a href="#a34d64773304b7e7471a363b64b3d738b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#ade35ebacba6d1d51f7e6a95df2669089">ennemiGetNum</a> (const <a class="el" href="structennemi.html">ennemi</a> *vilain)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">recupere le numéro de l'ennemi  <a href="#ade35ebacba6d1d51f7e6a95df2669089"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a5e3ac2da64409867dbc512be016271a4">ennemiGauche</a> (<a class="el" href="structennemi.html">ennemi</a> *vilain, <a class="el" href="structterrain.html">terrain</a> *ter)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">déplace l'ennemi vers la gauche  <a href="#a5e3ac2da64409867dbc512be016271a4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a1c001fed9da3ac9d3e21de16ff7a3e23">ennemiDroite</a> (<a class="el" href="structennemi.html">ennemi</a> *vilain, <a class="el" href="structterrain.html">terrain</a> *ter)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">déplace l'ennemi vers la droite  <a href="#a1c001fed9da3ac9d3e21de16ff7a3e23"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a78a872c8237423d4a9c72ab246e53b5e">ennemiBas</a> (<a class="el" href="structennemi.html">ennemi</a> *vilain, <a class="el" href="structterrain.html">terrain</a> *ter)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">déplace l'ennemi vers le bas  <a href="#a78a872c8237423d4a9c72ab246e53b5e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a8ecde31873bb3f21e4a15c7fe9c47948">ennemiHaut</a> (<a class="el" href="structennemi.html">ennemi</a> *vilain, <a class="el" href="structterrain.html">terrain</a> *ter)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">déplace l'ennemi vers le haut  <a href="#a8ecde31873bb3f21e4a15c7fe9c47948"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a964afca95f8840fdd4c1f6b8d2c1d1a4">ennemiAffiche</a> (const <a class="el" href="structennemi.html">ennemi</a> *vilain, <a class="el" href="structterrain.html">terrain</a> *ter)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">affiche l'ennemi sur le terrain  <a href="#a964afca95f8840fdd4c1f6b8d2c1d1a4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a001f397282d7d6450de9b626fb5e0926">nombre_aleatoire</a> (const int a, const int b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">renvoi un nombre aleatoire entre a et b-1  <a href="#a001f397282d7d6450de9b626fb5e0926"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#ac923afd768f5b2c811470c7d06c2c290">ennemiDeplaceAleatoirement</a> (<a class="el" href="structennemi.html">ennemi</a> *vilain, <a class="el" href="structterrain.html">terrain</a> *ter)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">déplace l'ennemi de maniere aléatoire  <a href="#ac923afd768f5b2c811470c7d06c2c290"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#ad44779ef214c7eadf39c57b5b5818ee3">rechercheObjectifAttaque</a> (const <a class="el" href="structennemi.html">ennemi</a> *vilain, <a class="el" href="structterrain.html">terrain</a> *ter, int x, int y)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">recherche la 1ere case la plus proche de Mario  <a href="#ad44779ef214c7eadf39c57b5b5818ee3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a22a358e9cf64fbb353473e31b22d749c">rechercheObjectifDefense</a> (const <a class="el" href="structennemi.html">ennemi</a> *vilain, <a class="el" href="structterrain.html">terrain</a> *ter)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">recherche la case adjacente la plus proche pour eviter un danger  <a href="#a22a358e9cf64fbb353473e31b22d749c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a1b27d936157d923170e8f1f4a22edd98">caseSansDanger</a> (<a class="el" href="structterrain.html">terrain</a> *ter, int *x, int *y)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">recherche les coordonnée de la 1ere case sans danger la plus proche  <a href="#a1b27d936157d923170e8f1f4a22edd98"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#aac61e20c801657f5ed719e2ac222a99a">ennemiDeplaceIA</a> (<a class="el" href="structennemi.html">ennemi</a> *vilain, <a class="el" href="structterrain.html">terrain</a> *ter, const int x, const int y)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">déplace l'ennemi d'une case en fonction de l'objectif  <a href="#aac61e20c801657f5ed719e2ac222a99a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ennemi_8c.html#a4e9da9941079b6f02e6a24bb3b3cfa23">ennemiPoseBombe</a> (const <a class="el" href="structennemi.html">ennemi</a> *vilain, <a class="el" href="structterrain.html">terrain</a> *ter, const int nb)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">ennemi pose une bombe avec une chance sur nbAleatoire-1  <a href="#a4e9da9941079b6f02e6a24bb3b3cfa23"></a><br/></td></tr>
</table>
<hr/><h2>Documentation des fonctions</h2>
<a class="anchor" id="a1b27d936157d923170e8f1f4a22edd98"></a><!-- doxytag: member="ennemi.c::caseSansDanger" ref="a1b27d936157d923170e8f1f4a22edd98" args="(terrain *ter, int *x, int *y)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void caseSansDanger </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>recherche les coordonnée de la 1ere case sans danger la plus proche </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">x</td><td>pointeur sur entier </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">y</td><td>pointeur sur entier </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a964afca95f8840fdd4c1f6b8d2c1d1a4"></a><!-- doxytag: member="ennemi.c::ennemiAffiche" ref="a964afca95f8840fdd4c1f6b8d2c1d1a4" args="(const ennemi *vilain, terrain *ter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiAffiche </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>affiche l'ennemi sur le terrain </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a78a872c8237423d4a9c72ab246e53b5e"></a><!-- doxytag: member="ennemi.c::ennemiBas" ref="a78a872c8237423d4a9c72ab246e53b5e" args="(ennemi *vilain, terrain *ter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiBas </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>déplace l'ennemi vers le bas </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="ac923afd768f5b2c811470c7d06c2c290"></a><!-- doxytag: member="ennemi.c::ennemiDeplaceAleatoirement" ref="ac923afd768f5b2c811470c7d06c2c290" args="(ennemi *vilain, terrain *ter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiDeplaceAleatoirement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>déplace l'ennemi de maniere aléatoire </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="aac61e20c801657f5ed719e2ac222a99a"></a><!-- doxytag: member="ennemi.c::ennemiDeplaceIA" ref="aac61e20c801657f5ed719e2ac222a99a" args="(ennemi *vilain, terrain *ter, const int x, const int y)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiDeplaceIA </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>déplace l'ennemi d'une case en fonction de l'objectif </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ennemi</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>entier </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>entier </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="ada0d266ca8ce1d0dea970b2330efc97e"></a><!-- doxytag: member="ennemi.c::ennemiDetruire" ref="ada0d266ca8ce1d0dea970b2330efc97e" args="(ennemi *vilain, terrain *ter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiDetruire </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>libère la mémoire alloué pour l'ennemi </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a1c001fed9da3ac9d3e21de16ff7a3e23"></a><!-- doxytag: member="ennemi.c::ennemiDroite" ref="a1c001fed9da3ac9d3e21de16ff7a3e23" args="(ennemi *vilain, terrain *ter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiDroite </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>déplace l'ennemi vers la droite </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a5e3ac2da64409867dbc512be016271a4"></a><!-- doxytag: member="ennemi.c::ennemiGauche" ref="a5e3ac2da64409867dbc512be016271a4" args="(ennemi *vilain, terrain *ter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiGauche </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>déplace l'ennemi vers la gauche </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="ade35ebacba6d1d51f7e6a95df2669089"></a><!-- doxytag: member="ennemi.c::ennemiGetNum" ref="ade35ebacba6d1d51f7e6a95df2669089" args="(const ennemi *vilain)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ennemiGetNum </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>recupere le numéro de l'ennemi </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>entier </dd></dl>

</div>
</div>
<a class="anchor" id="a1457a0d2ed952cda1ad09507cba618ac"></a><!-- doxytag: member="ennemi.c::ennemiGetX" ref="a1457a0d2ed952cda1ad09507cba618ac" args="(const ennemi *vilain)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ennemiGetX </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>recupere coordonné x de l'ennemi </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>entier </dd></dl>

</div>
</div>
<a class="anchor" id="a34d64773304b7e7471a363b64b3d738b"></a><!-- doxytag: member="ennemi.c::ennemiGetY" ref="a34d64773304b7e7471a363b64b3d738b" args="(const ennemi *vilain)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ennemiGetY </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>recupere coordonné y de l'ennemi </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>entier </dd></dl>

</div>
</div>
<a class="anchor" id="a8ecde31873bb3f21e4a15c7fe9c47948"></a><!-- doxytag: member="ennemi.c::ennemiHaut" ref="a8ecde31873bb3f21e4a15c7fe9c47948" args="(ennemi *vilain, terrain *ter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiHaut </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>déplace l'ennemi vers le haut </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="ac29c2fc9d161742535e6157a1617c1e4"></a><!-- doxytag: member="ennemi.c::ennemiInit" ref="ac29c2fc9d161742535e6157a1617c1e4" args="(terrain *ter, const int cooX, const int cooY)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structennemi.html">ennemi</a>* ennemiInit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>cooX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>cooY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>initialise un ennemi </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cooX</td><td>entier </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cooY</td><td>entier </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>pointeur sur ennemi </dd></dl>

</div>
</div>
<a class="anchor" id="a4e9da9941079b6f02e6a24bb3b3cfa23"></a><!-- doxytag: member="ennemi.c::ennemiPoseBombe" ref="a4e9da9941079b6f02e6a24bb3b3cfa23" args="(const ennemi *vilain, terrain *ter, const int nb)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiPoseBombe </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>nbAleatoire</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>ennemi pose une bombe avec une chance sur nbAleatoire-1 </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">nbAleatoire</td><td>entier </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="afd1777fa7a252e49cece658fda059cfb"></a><!-- doxytag: member="ennemi.c::ennemiSetNumero" ref="afd1777fa7a252e49cece658fda059cfb" args="(ennemi *vilain, const int i)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiSetNumero </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>i</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>modifie le numero de l'ennemi </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">i</td><td>entier </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a980d7d43a6b3d545afbcef2bfa3b2de1"></a><!-- doxytag: member="ennemi.c::ennemiSetX" ref="a980d7d43a6b3d545afbcef2bfa3b2de1" args="(ennemi *vilain, const int abs)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiSetX </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>ennemi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>abs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>modifie coordonné x de l'ennemi </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ennemi</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">abs</td><td>entier </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a595f2cbe1fd4585d705eeabd06facba1"></a><!-- doxytag: member="ennemi.c::ennemiSetY" ref="a595f2cbe1fd4585d705eeabd06facba1" args="(ennemi *vilain, const int ord)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ennemiSetY </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>ennemi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>ord</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>modifie coordonné y de l'ennemi </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ennemi</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ord</td><td>entier </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a001f397282d7d6450de9b626fb5e0926"></a><!-- doxytag: member="ennemi.c::nombre_aleatoire" ref="a001f397282d7d6450de9b626fb5e0926" args="(const int a, const int b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nombre_aleatoire </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>renvoi un nombre aleatoire entre a et b-1 </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>entier </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>entier </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>entier </dd></dl>

</div>
</div>
<a class="anchor" id="ad44779ef214c7eadf39c57b5b5818ee3"></a><!-- doxytag: member="ennemi.c::rechercheObjectifAttaque" ref="ad44779ef214c7eadf39c57b5b5818ee3" args="(const ennemi *vilain, terrain *ter, int x, int y)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char rechercheObjectifAttaque </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>recherche la 1ere case la plus proche de Mario </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">vilain</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>entier </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>entier </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>caractere </dd></dl>

</div>
</div>
<a class="anchor" id="a22a358e9cf64fbb353473e31b22d749c"></a><!-- doxytag: member="ennemi.c::rechercheObjectifDefense" ref="a22a358e9cf64fbb353473e31b22d749c" args="(const ennemi *vilain, terrain *ter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char rechercheObjectifDefense </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structennemi.html">ennemi</a> *&#160;</td>
          <td class="paramname"><em>vilain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structterrain.html">terrain</a> *&#160;</td>
          <td class="paramname"><em>ter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>recherche la case adjacente la plus proche pour eviter un danger </p>
<dl><dt><b>Paramètres:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ennemi</td><td>pointeur sur ennemi </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ter</td><td>pointeur sur terrain </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Renvoie:</b></dt><dd>caractere </dd></dl>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tout</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Fichiers</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Fonctions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Définition de type</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Énumérations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Valeurs énumérées</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Généré le Thu Jun 7 2012 15:48:57 pour ChompBombs par&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
